break;
}
dbg(1, "trying port %s", port);
- if (fd = gbser_init(port), NULL == fd) {
+ if ((fd = gbser_init(port)) == NULL) {
dbg(1, "port %s not available.", port);
continue;
}
break;
}
dbg(1, "trying port %s", port);
- if (fd = gbser_init(port), NULL == fd) {
+ if ((fd = gbser_init(port)) == NULL) {
dbg(1, "port %s not available.", port);
continue;
}
port = xstrdup(fname);
dbg(1, "opening port %s", fname);
- if (fd = gbser_init(port), NULL == fd)
+ if ((fd = gbser_init(port)) == NULL)
{
fatal(MYNAME ": can't initialise port \"%s\"", port);
}
static void buf_extend(struct buf_head *h, size_t amt) {
struct buf_chunk *c;
size_t sz = amt + sizeof(struct buf_chunk);
- if (c = xmalloc(sz), NULL == c) {
- fatal(MYNAME ": Can't allocate %lu bytes for buffer\n", (unsigned long) sz);
- }
+ c = xmalloc(sz);
c->next = NULL;
c->size = amt;
c->used = 0;
port = xstrdup(fname);
db(1, "Opening port...\n");
- if (fd = gbser_init(port), NULL == fd) {
+ if ((fd = gbser_init(port)) == NULL) {
fatal(MYNAME ": Can't initialise port \"%s\"\n", port);
}
static void file_init(const char *fname) {
db(1, "Opening file...\n");
- if (fl = fopen(fname, "rb"), NULL == fl) {
+ if ((fl = fopen(fname, "rb")) == NULL) {
fatal(MYNAME ": Can't open file '%s'\n", fname);
}
}